package com.xyx.ssm.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xyx.ssm.dao.UserMapper;
import com.xyx.ssm.jdbcdao.WinefactoryDao;
import com.xyx.ssm.po.WineFactory;
import com.xyx.ssm.service.WinefactoryService;
import com.xyx.ssm.util.Page;

@Service
public class WinefactoryServiceImpl implements WinefactoryService{
   @Autowired
	private UserMapper userMapper;
   @Autowired 
    private   WinefactoryDao winefactoryDao;

public Page<Map<String, Object>> findPage(Page<Map<String, Object>> page) {
	// TODO Auto-generated method stub
	return winefactoryDao.findPage("com.xyx.ssm.jdbcdao.winefactoryDao.SelectAllpage",page);
}
public int winefactoryadd(WineFactory wineFactory){
	   return winefactoryDao.winefactoryadd(wineFactory);
}
public int winefactoryDelete(String ids) {
	int n=0;
	   String [] s=ids.split(",");
	           for(int i=0;i<s.length;i++){
	        	   Integer id=Integer.parseInt(s[i]);
	        n=winefactoryDao.winefactoryDelete(id);
	           }
	return n;
}
public int winfactoryUpdate(WineFactory wineFactory) {
	// TODO Auto-generated method stub
	return winefactoryDao.winfactoryUpdate(wineFactory);
}
public List<WineFactory> winfactoryId(Integer id) {
	// TODO Auto-generated method stub
	return winefactoryDao.winfactoryId(id);
}



   
}
